Skip to content

[docs-infra] Add Benchmarking Pages to Docs#713

Merged
dav-is merged 434 commits into
masterfrom
davis/add-docs-benchmarking
Jan 15, 2026
Merged

[docs-infra] Add Benchmarking Pages to Docs#713
dav-is merged 434 commits into
masterfrom
davis/add-docs-benchmarking

Conversation

@dav-is
Copy link
Copy Markdown
Member

@dav-is dav-is commented Sep 16, 2025

Important

For the most accurate benchmarks, you should use a production build in incognito mode

Add a benchmarking page at /docs-infra/components/code-highlighter/bench

This page shows the code needed to reproduce the benchmark and a button that opens the bench dialog

Screenshot From 2025-09-15 19-47-01

Demo code can be opened in a dialog. The demo page is loaded into an iframe which reports web vitals like First Contentful Paint (FCP), Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), Interaction to Next Paint (INP), Time to Interactive (TTI), Total Blocking Time (TBT). Long tasks considered blocking (longer than 50ms) are also logged. After the 5 seconds needed to calculate TTI, the user can interact with the benchmark frame. This is helpful to see if any long tasks are reported.

Screenshot From 2025-09-15 19-47-16

The benchmark can be opened directly for more advanced profiling at /bench/docs-infra/components/code-highlighter/demos/code

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 5, 2026

Deploy Preview for mui-internal ready!

Name Link
🔨 Latest commit 9f2149d
🔍 Latest deploy log https://app.netlify.com/projects/mui-internal/deploys/696910e5a648ae0008d9b86c
😎 Deploy Preview https://deploy-preview-713--mui-internal.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be interesting is to be able to compare all the different methods of highlighting so that we can prove the right choices were made in terms of architecture.

Also not sure I understand why we can't just use the devtools performance tab. Creating this little web vitals checker around the benchmark page doesn't seem to really add value, it's just more code to maintain.

@oliviertassinari oliviertassinari temporarily deployed to davis/add-docs-benchmarking - mui-tools-public PR #713 January 15, 2026 16:08 — with Render Destroyed
@oliviertassinari oliviertassinari temporarily deployed to davis/add-docs-benchmarking - code-infra-dashboard PR #713 January 15, 2026 16:08 — with Render Destroyed
@oliviertassinari oliviertassinari temporarily deployed to davis/add-docs-benchmarking - mui-tools-public PR #713 January 15, 2026 16:08 — with Render Destroyed
@oliviertassinari oliviertassinari temporarily deployed to davis/add-docs-benchmarking - code-infra-dashboard PR #713 January 15, 2026 16:08 — with Render Destroyed
@oliviertassinari oliviertassinari temporarily deployed to davis/add-docs-benchmarking - code-infra-dashboard PR #713 January 15, 2026 16:08 — with Render Destroyed
@dav-is
Copy link
Copy Markdown
Member Author

dav-is commented Jan 15, 2026

Merging this as it documents how to serve demos through iframes and read basic performance metrics. We can iterate on this further to bring more benchmarks, custom performance markets, comparisons between different benchmarks, averaging runs, Google Analytics RUM, etc

@dav-is dav-is merged commit f0d7ff1 into master Jan 15, 2026
15 checks passed
@dav-is dav-is deleted the davis/add-docs-benchmarking branch January 15, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants